package com.db.service;

import com.db.dao.PrinterMapper;
import com.db.dao.ProductMapper;
import com.db.domain.Printer;
import com.db.domain.Product;

public class Service {
    private PrinterMapper printerMapper;
    private ProductMapper productMapper;

    public void setPrinterMapper(PrinterMapper printerMapper) {
        this.printerMapper = printerMapper;
    }

    public void setProductMapper(ProductMapper productMapper) {
        this.productMapper = productMapper;
    }

    public void printPrinter(Integer id) {
        Printer printer = printerMapper.getPrinter(id);
        System.out.println(printer);
    }

    public void printProduct(Integer id) {
        Product product = productMapper.getProduct(id);
        System.out.println(product);
    }
}
